<!DOCTYPE html>
<html lang="en">
<head>
	<title>文件预览管理后台</title>
	<meta name="viewport" content="width=device-width, initial-scale=1" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   	<link rel="stylesheet" href="login/css/font-awesome.min.css" />
	<link href="login/css/style.css" rel='stylesheet' type='text/css' media="all">
	<script src="../js/jquery-3.0.0.min.js" type="text/javascript"></script>
</head>
<script type="text/javascript">
 function startLogin(){
	var user_email = $("#user_email").val();
	var user_pwd = $("#user_pwd").val();
	var data = {email:user_email,pwd:user_pwd};
	if(user_email != "" && user_pwd != ""){
		$.get('${baseUrl}checkLogin',
			   data,
			   function(ref){
			   		var result = JSON.parse(ref);
			   		console.log(JSON.parse(ref));
			    	if(result.code == 0){
			    		parent.location.href='${baseUrl}index';
			    	}else{
			    		parent.location.href='${baseUrl}';
			    	}
			   	}
			   );
	}
}
</script>
<body>
<div class="main-w3">
   <form action="#" method="post">
        <h2><span class="fa fa-user t-w3"></span></h2>
	     <div class="login-w3ls">
	         <div class="icons">
	             
			     <input type="email" name="email" placeholder="Email" required id="user_email">
				 <span class="fa fa-user"></span>
	          <div class="clear"></div> 
			</div> 		   
			 <div class="icons">
					
					<input type="password" name="password" placeholder="Password" required id="user_pwd">
					<span class="fa fa-key"></span>
			         <div class="clear"></div>
			</div>
		     <div class="btnn">
		          <button type="submit" onclick="startLogin();">Login</button><br>
	        </div>	
	     </div>
   </form>

 </div> 
 
</body>
</html>